import { createApp } from 'vue'
import '@/assets/css/style.css'
import App from './App.vue'
import TDesign from 'tdesign-mobile-vue';
// 引入组件库的少量全局样式变量
import 'tdesign-mobile-vue/es/style/index.css';
import 'vant/lib/index.css'
import './main.css';
// 启用快捷css
// import '@/assets/css/common.css'

// 启用动画
// import '@/assets/css/animated.css'
// 字体图标动画

// 创建vue实例

import '../src/font/fonts.css';

import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'

import router from '@/router';
import Vant from 'vant';

//使用状态管理
import pinia from './store'
import VConsole from 'vconsole';
import CommonHeader from '@/components/CommonHeader.vue';

// 初始化 vConsole 方便调试,正式版需要注释掉
const vConsole = new VConsole();
console.log('vConsole is ready.');
const app = createApp(App);
app.use(TDesign);
app.use(router);

app.use(Vant); 
app.component('CommonHeader', CommonHeader)


app.use(ElementPlus, {
    locale: zhCn
})
for (const name in ElementPlusIconsVue) {
    app.component(name, ElementPlusIconsVue[name])
}

app.use(pinia);
app.mount('#app')
